package com.situ.student.controller;

import java.util.List;

import com.situ.student.entity.Student;
import com.situ.student.service.IStudentService;
import com.situ.student.service.impl.StudentServiceImpl;

/**
 * 和学生相关的Controller
 */
public class StudentController {
	private IStudentService studentService = new StudentServiceImpl();

	public List<Student> list() {
		return studentService.list();
	}

	public boolean insert(String name, int age, String gender) {
		Student student = new Student(name, age, gender);
		return studentService.insert(student);
	}

	public boolean deleteById(Integer id) {
		return studentService.deleteById(id);
	}
}
